{% extends "login_base.html" %}

{% block content %}

    <form action="{% url 'login' %}" method="post">
    {% csrf_token %}
        {#    <img class="mb-4" src="../assets/brand/bootstrap-logo.svg" alt="" width="72" height="57">#}
        <h1 class="h3 mb-3 fw-normal">请登录</h1>

        <div class="form-floating">
            <input name="username" type="text" class="form-control" id="floatingInput" placeholder="name@example.com" required>
            <label for="floatingInput">用户名</label>
        </div>
        <div class="form-floating">
            <input name="password" type="password" class="form-control" id="floatingPassword" placeholder="Password" required>
            <label for="floatingPassword">密码</label>
        </div>

        <button class="w-100 btn btn-lg btn-primary" type="submit">登录</button>
        <p class="mt-5 mb-3 text-muted">&copy; 2017–2021</p>
    </form>

{% if form.errors %}
    <div class="text-danger">
<p>Your username and password didn't match. Please try again.</p>
    </div>
{% endif %}

{% if next %}
    {% if user.is_authenticated %}
    <p>Your account doesn't have access to this page. To proceed,
    please login with an account that has access.</p>
    {% else %}
    <p>Please login to see this page.</p>
    {% endif %}
{% endif %}

{# Assumes you setup the password_reset view in your URLconf #}
<p><a href="{% url 'password_reset' %}">Lost password?</a></p>

{% endblock %}